<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>

<head>
<title>设备信息列表</title>
<script type="text/javascript">
function togle(dv){
	$('#s'+dv).toggle(function(){
		$('#'+dv).show();
		$('#s'+dv).attr('src','<s:url value="/common/images/optImg/minus.png"/>');
		},function(){
			$('#'+dv).hide();
			$('#s'+dv).attr('src','<s:url value="/common/images/optImg/plus.png"/>');
		});
	};
$(document).ready(function(){
	$('input[name="qdum.beg_date"]').val("");
	$('input[name="qdum.end_date"]').val("");
})
</script>
</head>
<body>
<h2 class="title">设备使用条件查询</h2>
<s:form id="queryDeviceUse" action="deviceuse/ListDeviceuse!toQuery">
	<table class="form">
		<tr>
			<th width="10%">设备编号</th>
			<td width="25%"><s:textfield name="qdum.deviceId" /></td>
			<th width="10%">设备编号</th>
			<td width="25%"><s:textfield name="qdum.deviceName" /></td>
			<th width="10%">申请人</th>
			<td width="20%"><m:dropUser name="qdum.userAppId" headKey="--请选择--"
				headValue="" /></td>
		</tr>
		<tr>
			<th>领取人</th>
			<td><m:dropUser name="qdum.userReceiveId" headKey="--请选择--"
				headValue="" /></td>
			<th>归还人</th>
			<td><m:dropUser name="qdum.userReturnId" headKey="--请选择--"
				headValue="" /></td>
			<th>验收人</th>
			<td><m:dropUser name="qdum.userAuthId" headKey="--请选择--"
				headValue="" /></td>
		</tr>
		<tr>
			<th>开始时间</th>
			<td><m:date name="qdum.beg_date" id="s_date" time="true" /></td>
			<th>截止时间</th>
			<td><m:date name="qdum.end_date" id="e_date" time="true" /></td>
			<td colspan="2"></td>
		</tr>
	</table>
	<div class="btnGroup"><s:submit value="查询" /></div>
</s:form>
<h2 class="title">设备使用信息列表 <m:imgA img="add" msg="设备领取"
	action="deviceuse/EditDeviceuse" /></h2>
<table class="list">
	<thead>
		<tr>
			<th width="8%">设备编号</th>
			<th width="8%">设备名称</th>
			<th width="8%">设备类别</th>
			<th width="8%">申请人</th>
			<th width="8%">领取人</th>
			<th width="8%">发放人</th>
			<th width="8%">验收人</th>
			<th width="10%">设备当前状态</th>
			<th width="12%">使用开始时间</th>
			<th width="12%">实际结束时间</th>
			<th width="5%">是否损坏</th>
			<th width="5%">有效</th>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="dulists.items">
			<tr id="pt${id }">
				<td><s:if test="hasNormal == false">
					<m:imgA img="plus" msg="显示" onclick="togle(${id})" id="s${id}" />
				</s:if> <s:property value="deviceid.deviceNo" /></td>
				<td><s:property value="deviceid.deviceName" /></td>
				<td><m:property value="deviceid.devicetype" /></td>
				<td><s:property value="userApp.name" /></td>
				<td><s:property value="userReceive.name" /></td>
				<td><s:property value="userRelease.name" /></td>
				<td><s:property value="userAuth.name" /></td>
				<td><m:property value="deviceid.deviceState" /></td>
				<td><s:date name="use_startdate" format="yyyy-MM-dd HH:mm" /></td>
				<td><s:date name="real_enddate" format="yyyy-MM-dd HH:mm" /></td>
				<td><s:if test="hasNormal == true">否</s:if><s:else>是</s:else></td>
				<td><s:if test="hasOff == true">否</s:if><s:else>是</s:else></td>
			</tr>
			<tr id="${id}" style="display: none">
				<td style="text-align: right" colspan="2">设备损坏情况说明</td>
				<td colspan="10"><s:if test="hasNormal == false">
					<s:property value="noNormalDesc" />
				</s:if> <s:else>设备没有损坏！</s:else></td>
			</tr>
		</s:iterator>
	</tbody>
</table>
</body>